Page({
  data: {
    id: '',
    info: ''
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  },
  // onLoad,onShow,onReady,onHide,onUnload
  onLoad({
    id
  }) {
    this.setData({
      id
    })
    this.getData()
  },
  // 获取房屋详情
  async getData() {
    const res = await wx.http.get('/room/' + this.data.id)
    console.log('房屋详情', res);
    this.setData({
      info: res.data
    })
  }
})